<?php


namespace app\zhongcan\model;


use think\Model;

class BannerModel extends Model
{
    protected $name = 'banner';
    protected $autoWriteTimestamp = 'datetime';
    //获取器，修改状态的值
    public function getSwitchAttr($value)
    {
        $switch = ['1'=>'是','0'=>'否'];
        return $switch[$value];
    }
}